﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Catsland.Core
{
	public class RepeatableList<typename>
	{
		protected List<typename> m_list;
		public virtual void AddItem(typename item)
		{
			if (m_list == null)
			{
				m_list = new List<typename>();
			}
			m_list.Add(item);
		}

		public virtual void RemoveItem(typename item)
		{
			m_list.Remove(item);
		}

		public virtual void ReleaseAll()
		{
			if (m_list != null)
			{
				m_list.Clear();
			}
		}

		public List<typename> GetList()
		{
			return m_list;
		}
	}
}
